<template>
  <el-table :data="tableData" style="width: 100%">
    <el-table-column prop="img" label="图片" width="180"/>
    <el-table-column prop="title" label="菜名" width="180" />
    <el-table-column prop="main_food" label="配料" />
  </el-table>
</template>

<script>
import axios from 'axios'
export default {
    name:'pachong',
    data(){
        return{
            host:"http://127.0.0.1:8000/",
            tableData:'',
        }
    },
    mounted(){
        axios.get(this.host+'users/pachong/').then((resp) => {
            console.log(resp)
            if (resp.status == 200){
                this.tableData = resp.data
                this.tableData.img = resp.data.img
            }
        }).catch((err) => {
            console.log(err)            
        });
    }
}
</script>

<style>

</style>